defs.h: Add fields for Mark.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 21 Oct 2003 13:48:27 +0000 (13:48 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 21 Oct 2003 13:48:27 +0000 (13:48 +0000)
cetus.c: Add option to append icon description to description.

gpsbabel/cetus.c
gpsbabel/defs.h

index 817bbd5e07bae0da56b6e3f2781beacb3ae3ead2..9d9ebb374cea7b8ea7c5041212157c35d2d7ade4 100644 (file)
@@ -80,10 +80,13 @@ struct pdb_record *opdb_rec;
 static void *mkshort_wr_handle;
 
 static char *dbname = NULL;
+static char *appendicon = NULL;
 
 static
 arglist_t cetus_args[] = {
        {"dbname", &dbname, "Database name", ARGTYPE_STRING },
+       {"appendicon", &appendicon, "Append icon_descr to description.",
+               ARGTYPE_BOOL },
        {0, 0, 0, 0 }
 };
 
@@ -263,14 +266,24 @@ cetus_writewpt(waypoint *wpt)
        else {
                        vdata[0] ='\0';
        }
+       if (appendicon && wpt->icon_descr) {
+               int left = 500 - strlen( vdata );
+               int ilen = strlen( wpt->icon_descr );
+               if (ilen && left > (ilen+3)) {
+                       strcat( vdata, " (" );
+                       strcat( vdata, wpt->icon_descr );
+                       strcat( vdata, ")" );
+               }
+       }
        vdata += strlen( vdata ) + 1;
        
        if ( wpt->notes ) {
-                       strncpy( vdata, wpt->notes, 501 );
-                               vdata[500] = '\0';
+               /* RER note: this doesn't seem to be viewable in Cetus 1.2b2 */
+               strncpy( vdata, wpt->notes, 501 );
+               vdata[500] = '\0';
        }
        else {
-                       vdata[0] ='\0';
+               vdata[0] ='\0';
        }
        vdata += strlen( vdata ) + 1;
        
index 979df34929400b93551bb370e31ed158f7c993f1..8203de7cdde7a8eaf0cc2bc85d2492998645595e 100644 (file)
@@ -133,6 +133,20 @@ typedef struct xml_tag {
 typedef struct {
        queue Q;
        position position;
+
+       /* 
+        * The "thickness" of a waypoint; adds an element of 3D.  Can be
+        * used to construct rudimentary polygons for, say, airspace 
+        * definitions.
+        */
+       double depth;
+
+       /*
+        * An alarm trigger value that can be considered to be a circle
+        * surrounding a waypoint (or cylinder if depth is also defined)
+        */
+       double proximity;
+
        /* shortname is a waypoint name as stored in receiver.  It should
         * strive to be, well, short, and unique.   Enforcing length and
         * character restrictions is the job of the output.   A typical